<template>
  <div class="child-2">
    <h2>in child2:</h2>
    <p>props: {{ pChild2 }}</p>
    {{pchild2}}
    <p>$attrs: {{ $attrs }}</p>
    <p>pchild3Name: {{ $attrs.pchild3.name }}</p>
    <hr/>
  </div>
</template>

<script>
export default {
  data() {
    return {
      child2:'child2'
    };
  },
  props: {
    pChild2:{
      type:String,
    },
    pchild2:{
      type:Number,
    }
  },
  inheritAttrs: false,
  mounted() {
    console.log(this.pchild3)
     console.log(this.$attrs.pchild3)
    this.$emit("method2",this.child2);
  },
};
</script>
